package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.CommentLike;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;

/**
 * @Desciption:test
 * @Create by:金木yan
 * @Date: 2021/12/3 19:33
 */
@DubboService
public class CommentLikeApiImpl implements CommentLikeApi {
    @Autowired
    private MongoTemplate mongoTemplate;

    /**
     * 保存评论点赞数据
     *
     * @param commentLike
     */
    @Override
    public void save(CommentLike commentLike) {
        mongoTemplate.save(commentLike);
    }

    /**
     * 删除评论点赞数据
     *
     * @param commentLike
     */
    @Override
    public void delete(CommentLike commentLike) {
        mongoTemplate.remove(commentLike);
    }
}
